<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="ProductBuy.aspx.cs" Inherits="Admin_ProductBuy" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="Server">
    <div id="page-heading">
        <h1>
            Add or Update Product Buy</h1>
    </div>
    <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
        <tr>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
            <th class="topleft">
            </th>
            <td id="tbl-border-top">
                &nbsp;</td>
            <th class="topright">
            </th>
            <th rowspan="3" class="sized">
                <img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
        </tr>
        <tr>
            <td id="tbl-border-left">
            </td>
            <td>
                <!--  start content-table-inner -->
                <div id="content-table-inner">
                    <table border="0" width="100%" cellpadding="0" cellspacing="0">
                        <tr valign="top">
                            <td>
                                <div style="width: 920px; float: left;">
                                    <div style="width: 460px; float: left;">
                                        <!-- start id-form -->
                                        <table border="0" cellpadding="0" cellspacing="0" id="id-form">
                                            <tr>
                                                <th valign="top">
                                                    Title Buying:</th>
                                                <td>
                                                    <input type="text" style="width: 320px" id="txtName" runat="server" /><span style="color: Red">(*)</span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th valign="top">
                                                    KeyWord:</th>
                                                <td>
                                                    <input type="text" style="width: 320px" id="txtKeyword" runat="server" /><span style="color: Red">(*)</span>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="3">
                                                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                                        <contenttemplate>
                                                            <table>
                                                                <tr>
                                                                    <th valign="top">
                                                                        Product Category:</th>
                                                                    <td>
                                                                        <asp:DropDownList ID="ddlProCat" Width="320" runat="server" OnSelectedIndexChanged="ddlProSubCat_OnSelectedIndexChanged"
                                                                            AutoPostBack="true">
                                                                        </asp:DropDownList><span style="color: Red">(*)</span>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <th valign="top">
                                                                        SubCategory:</th>
                                                                    <td>
                                                                        <asp:DropDownList ID="ddlSubCat" Width="320" runat="server" OnSelectedIndexChanged="ddlSubCat_OnSelectedIndexChanged"
                                                                            AutoPostBack="true">
                                                                        </asp:DropDownList><span style="color: Red">(*)</span>
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <th valign="top">
                                                                        SubSubCategory:</th>
                                                                    <td>
                                                                        <asp:DropDownList ID="ddlSubSubCat" Width="320" runat="server">
                                                                        </asp:DropDownList><span style="color: Red">(*)</span>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </contenttemplate>
                                                    </asp:UpdatePanel>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th valign="top">
                                                    Product Discription:</th>
                                                <td>
                                                    <div style="width: 320px">
                                                        <asp:TextBox ID="txtDescription" runat="server" MaxLength="128" TextMode="MultiLine"
                                                            Width="320" Height="100"></asp:TextBox><br />
                                                        Character Remaining <span style="color: Red">128,5 </span>line max, don't enter
                                                        HTML or Contact Details in this box
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th valign="top">
                                                    Contact Option:</th>
                                                <td>
                                                    <div style="width: 320px">
                                                        <asp:RadioButton ID="rdocontacotion1" GroupName="1" runat="server" Text="Allow my full contact details all members" /><br />
                                                        <asp:RadioButton ID="rdocontacotion2" GroupName="1" runat="server" Text="Allow contact by <strong>Message Center only" /><br />
                                                        <asp:RadioButton ID="rdocontacotion3" GroupName="1" runat="server" Text="Allow <strong>only Gold Suppliers</strong> to view my contact details" />
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                    <!-- end id-form  -->
                                    <div style="width: 460px; float: left;">
                                        <table border="0" cellpadding="0" cellspacing="0" id="id-form">
                                            <tr>
                                                <th valign="top">
                                                    Product Photo:</th>
                                                <td>
                                                    <div style="width: 320px">
                                                        <div style="width: 120px; float: left; height: 100px;">
                                                            <img id="img" runat="server" width="100" height="100" />
                                                        </div>
                                                        <div style="width: 200px; float: left">
                                                            <asp:FileUpload ID="FULImg" runat="server" /><br />
                                                            <asp:Button ID="Delete" runat="server" Text="Delete" OnClick="Button1_Click" /><br />
                                                            Image format<span style="color: Red"> Jpeg, jpg, Gif,</span> or Png Size 3MB
                                                        </div>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th valign="top">
                                                    Price Range:</th>
                                                <td>
                                                    <div style="width: 350px; float: left;">
                                                        <div style="width: 150px; float: left;">
                                                            <asp:DropDownList ID="ddlcurrunce" Width="140" runat="server">
                                                            </asp:DropDownList>
                                                        </div>
                                                        <div style="width: 100px; float: left;">
                                                            <input type="text" style="width: 80px;" id="txtMinQuantity" onkeyup="this.value = FormatNumber(this.value);"
                                                                runat="server" />
                                                        </div>
                                                        <div style="width: 100px; float: left;">
                                                            <input type="text" style="width: 90px;" id="txtLargeQuantity" runat="server" onkeyup="this.value = FormatNumber(this.value);" />
                                                        </div>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th valign="top">
                                                    Quantity Required:</th>
                                                <td>
                                                    <div style="width: 350px; float: left;">
                                                        <div style="width: 205px; float: left;">
                                                            <input type="text" style="width: 190px;" id="txtquantity" onkeyup="this.value = FormatNumber(this.value);"
                                                                runat="server" />
                                                        </div>
                                                        <div style="width: 140px; float: left;">
                                                            <asp:DropDownList ID="ddlUnitType" Width="140" runat="server">
                                                            </asp:DropDownList>
                                                        </div>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th valign="top">
                                                    Required Certifacition:</th>
                                                <td>
                                                    <textarea rows="5" id="txtPackagin" runat="server" cols="3" style="width: 340px;"></textarea></td>
                                            </tr>
                                            <tr>
                                                <th valign="top">
                                                    Expire After:</th>
                                                <td>
                                                    <%--<asp:TextBox ID="txtStartDate" runat="server" CssClass="textfield" Width="80px"></asp:TextBox>--%>
                                                    <input type="text" style="width: 120px" id="txtExpiredate" runat="server" />
                                                    <input id="Button2" type="button" onclick="displayDatePicker(document.getElementById('<%=txtExpiredate.ClientID%>').name , false,'<%=RTISettings.FormatDateToCalendar%>','/');"
                                                        value="..." style="width: 25px;" />
                                                    <asp:CustomValidator ID="Customvalidator1" runat="server" ClientValidationFunction="ClientValidationDateTime"
                                                        ControlToValidate="txtExpiredate">*</asp:CustomValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <th valign="top">
                                                    Member:</th>
                                                <td>
                                                    <asp:DropDownList ID="ddlMember" Width="340px" runat="server">
                                                    </asp:DropDownList></td>
                                            </tr>
                                            <tr>
                                                <th valign="top">
                                                    SortOrder:</th>
                                                <td>
                                                    <input type="text" style="width: 80px;" title="0" id="txtOrder" runat="server" onkeyup="this.value = FormatNumber(this.value);" /></td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                                <div style="width: 930px; float: left;">
                                    <div style="width: 110px; float: left; font-weight: bold;">
                                        Detail Description:
                                    </div>
                                    <div style="width: 800px; float: left;">
                                        <FCKeditorV2:FCKeditor ID="fck_Desc" runat="server" Width="800px" ToolbarSet="RTI"
                                            Height="250px" ToolbarCanCollapse="false" BasePath="~/Javascripts/FCKEditor/">
                                        </FCKeditorV2:FCKeditor>
                                    </div>
                                </div>
                                <div style="width: 700px; margin-left: 100px; float: left; padding-top: 20px;">
                                    <asp:Button ID="btnsave" CausesValidation="true" OnClientClick="return CheckValue()"
                                        CssClass="form-submit" Text="Save" runat="server" OnClick="btnsave_Click" />
                                    <asp:Button ID="btnexit" CssClass="form-reset" Text="Reset" runat="server" OnClick="btnexit_Click"
                                        CausesValidation="False" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <img src="images/shared/blank.gif" width="695" height="1" alt="blank" /></td>
                            <td>
                            </td>
                        </tr>
                    </table>
                    <div class="clear">
                    </div>
                </div>
                <!--  end content-table-inner  -->
            </td>
            <td id="tbl-border-right">
            </td>
        </tr>
        <tr>
            <th class="sized bottomleft">
            </th>
            <td id="tbl-border-bottom">
                &nbsp;</td>
            <th class="sized bottomright">
            </th>
        </tr>
    </table>
    <div class="clear">
        &nbsp;</div>

    <script type="text/javascript">
            function CheckValue()
            {
                {
                
                 var ddlProCat=document.getElementById("<%=ddlProCat.ClientID%>");
                 var ddlSubCat=document.getElementById("<%=ddlSubCat.ClientID%>");
                 var txtName=document.getElementById("<%=txtName.ClientID%>");
                 var txtKey=document.getElementById("<%=txtKeyword.ClientID%>");
                 if(txtName.value=='')
                 {
                    alert('Name is not Null !');
                    return false;
                 }
                 if(txtKey.value=='')
                 {
                    alert('Keyword is not Null !');
                    return false;
                 }
                 if(ddlProCat.value=='0')
                 {
                    alert('Category is not Null !');
                    return false;
                 }
                 if(ddlSubCat.value=='0')
                 {
                    alert('SubCategory is not Null !');
                    return false;
                 }
                 else
                 {
                    return true;
                 }
                
            }
            }
    </script>

</asp:Content>
